﻿//自定义新增方法
var fnCustomAdd = function () {
    window.parent.$("#tabs").tabs('close', '起草内训交付单');
    var pagetitle = "起草内训交付单";
    parent.addTabs(pagetitle, '../Crm/BasePages/StartWorkflow.aspx?title=&WorktaskId=683d2304-00b5-4c44-b566-a9c7bee33a80&WorkflowId=db7921f0-8586-4c9f-82bd-6acae6f990c3');
    parent.NeedRefreshPage = this;
}
//自动义双击方法
function CustomDbClick() {
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    var vid = record.getData("WorkFlowInsId");
    if (vid != "") {
        window.parent.$("#tabs").tabs('close', '查看交付申请单--内训');
        var pagetitle = "查看交付申请单--内训";
        parent.addTabs(pagetitle, '../Crm/Deliver/AddDeliverTrain.aspx?r=' + Math.random() + '&view=check&flag=1&entity=' + const_EditEntity + '&id=' + vid + '&title=' + encodeURI(pagetitle));
        parent.NeedRefreshPage = this;
    }
}
//格式化启动时间
var formatStartTime = function (elCell, oRecord, oColumn, sData) {
    if (sData == "0001-01-01 " || sData == "1900-01-01 " || sData == null) {
        elCell.innerHTML = "";
    } else {
        elCell.innerHTML = sData;
    }
}
//格式化结案时间
var formatEndTime = function (elCell, oRecord, oColumn, sData) {
    if (sData == "0001-01-01 " || sData == "1900-01-01 " || sData == null) {
        elCell.innerHTML = "";
    } else {
        elCell.innerHTML = sData;
    }
}
